<template>
	<view class="content">
		<view class="wid100" style="height: 469rpx;">
			<image :src="url+'/addon/qianyu_petrol/wxapp/image/ynjd.jpg'" class="wh100"></image>
		</view>
		<view class="wid90 mar mar-top40 dis disAl disJuB">
			<view class="dis disAl">
				<image src="../../static/kefu2.png" style="width: 119rpx;height: 119rpx;"></image>
				<view class="mar-left20 foSi35 fowe800" >客服小优</view>
			</view>
			<view class="dis disAl fowe600">
				<view class="dis disAl disJuC foSi20 butt1 borRad40" @click="phoneClick()">
					<view style="width: 20rpx;height: 20rpx;margin-right: 6rpx;">
						<image src="../../static/dianhu2.png" class="wh100"></image>
					</view>
					<view>拨打电话</view>
				</view>
				<button class="dis disAl disJuC foSi20 butt2 borRad40 coFFF mar-left10 bacFFF" open-type="contact">
					<view style="width: 20rpx;height: 20rpx;margin-right: 6rpx;">
						<image src="../../static/zixun1.png" class="wh100"></image>
					</view>
					<view>在线咨询</view>
				</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: this.global.url,
				gasstation: ''
			}
		},
		onLoad() {
			this.getList()
		},
		methods: {
			phoneClick(){
				var that = this
				uni.makePhoneCall({
					phoneNumber: that.gasstation.mobile //仅为示例
				});
			},
			getList() {
				var that = this;
				uni.request({
					url: that.global.url + '/api/qianyu_petrol/gasstation_index',
					method: "POST",
					header: {
						'site-id': that.global.site_id, //自定义请求头信息
					},
					data: {
						id: uni.getStorageSync('jiaId')
					},
					success(res) {
						let result = res.data
						console.log(result)
						if (result.code == 1) {
							that.gasstation = result.data
						}
					}
				})
			},
		}
	}
</script>

<style>
	.content {}
	.butt1{
		width: 161rpx;
		height: 51rpx;
		border: 1rpx solid #37BCC3;
		color: #37BCC3;
	}
	.butt2{
		width: 161rpx;
		height: 51rpx;
		background: #37BCC3;
	}
</style>